# -*- coding: utf-8 -*-
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
from urllib.parse import urljoin
from datetime import datetime
import logging
import traceback
import re

_logger = logging.getLogger(__name__)


class InvoiceLine(models.Model):
    _name = 'invoice.line'
    _description = 'Invoice Line'
    _inherit = ['mail.thread', 'mail.activity.mixin']
    _order = 'create_date desc'


    line_number = fields.Char(string='Line Number', readonly=True)
    description = fields.Text(string='Description')
    valid_from = fields.Datetime(string='Valid From')
    valid_to = fields.Datetime(string='Valid To')
    ocr_line_id = fields.Integer(string='OCR Line ID')
    price = fields.Float(string='Price')
    quantity = fields.Float(string='Quantity')
    tax_code = fields.Char(string='Tax Code')
    tax_rate = fields.Char(string='Tax Rate')

    order_id = fields.Many2one('order.model')



